package com.wang.interview.designmode.watcher;

/**
 * @author: wang
 * @date: 2021/8/2 11:12
 * @description:
 */
public class Client {

    public static void main(String[] args) {
        WeatherDataSubject weatherDataSubject = new WeatherDataSubject();
        BaiDuObservers baiDuObservers = new BaiDuObservers();
        JDObservers jdObservers = new JDObservers();
        weatherDataSubject.register(baiDuObservers);
        weatherDataSubject.register(jdObservers);
        weatherDataSubject.setTemperature(100);
        weatherDataSubject.setPressure(10000);
        weatherDataSubject.notifyT();
        System.out.println("================================");
        weatherDataSubject.setTemperature(-127);
        weatherDataSubject.setPressure(0);
        weatherDataSubject.notifyT();
        System.out.println("================================");
        weatherDataSubject.register(new ALiYunObservers());
        weatherDataSubject.notifyT();
    }
}

